import { useState } from "react";
import { useNavigate } from "react-router-dom";
import "./assets/login.scss";

export default function LoginPage() {
    // eslint-disable-next-line @typescript-eslint/no-unused-vars
    const navigate = useNavigate();
    const [active, setActive] = useState(false);
    return (
        <div className='login'>
            <div className='login__entry-field'>
                <h1>Login</h1>
                <input type='text' placeholder='Login' className='login__pass-field' />
                <input type='password' placeholder='Password' className='login__pass-field' />
                <button
                    className='login__submit-btn'
                    type='submit'
                    onClick={() => {
                        // navigate("/board");
                        setActive((previous) => !previous);
                    }}
                >
                    Login
                </button>
            </div>
            <div className={"login__error" + (active ? " active" : "")}>Error!</div>
        </div>
    );
}
